[PATCH] [ARM] Use TargetMachine over Subtarget in ARMAsmPrinter (#166329)
authorDavid Green <david.green@arm.com>
Wed, 12 Nov 2025 16:26:21 +0000 (16:26 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 16 Dec 2025 11:47:30 +0000 (12:47 +0100)
commit64f72f3ecce0bef7f99549b24155f088d1db202f
tree2138d2eda53e4b531c0e27785543758af1838044
parent001efe5899e6b00dc22b13850d747180b491cfeb
[PATCH] [ARM] Use TargetMachine over Subtarget in ARMAsmPrinter (#166329)

The subtarget may not be set if no functions are present in the module.
Attempt to use the TargetMachine directly in more cases.

Fixes #165422
Fixes #167577

Gbp-Pq: Name fix-crash-ghc-arm.patch
llvm/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/lib/Target/ARM/ARMSubtarget.cpp
llvm/lib/Target/ARM/ARMTargetMachine.h
llvm/test/CodeGen/ARM/xxstructor-nodef.ll [new file with mode: 0644]